package com.jwj.service.impl;

import com.jwj.Dao.CategoryDao;
import com.jwj.pojo.Category;
import com.jwj.pojo.CategoryTable;
import com.jwj.pojo.Category_account;
import com.jwj.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    private CategoryDao categoryDao;


    @Override
    public List<CategoryTable> CategoryTable() {
        return categoryDao.CategoryTable();
    }

    @Override
    public List<Category_account> CategoryAll() {
        return categoryDao.CategoryAll();
    }

    @Override
    public int AddCategory(Category category) {
        return categoryDao.AddCategory(category);
    }

    @Override
    public int DeleteCategory(int category_id) {
        return categoryDao.DeleteCategory(category_id);
    }

    @Override
    public int UpdateCategory(Category category) {
        return categoryDao.UpdateCategory(category);
    }


    @Override
    public Category toFindCategory(int category_id) {
        return categoryDao.toFindCategory(category_id);
    }

    @Override
    public List<Category_account> toFindState(String state) {
        return categoryDao.toFindState(state);
    }
}
